/* 
 * File:   Game.h
 * Author: Chris
 *
 * Created on March 4, 2011, 11:23 AM
 */

#ifndef _GAME_H
#define	_GAME_H

#include "PChess.h"
#include "Board.h"

class Game {
public:

    Game(string boardLayout, bool alphabeta);
    virtual ~Game();
    Game(const Game&);

    game_result humanMove(int, int, int, int);
    void    castle(bool playerIsWhite, bool kingside);
    void        printGame();
    game_result startGame(int);


private:
    
    game_result cpuMove();
    int         eval(Board*);
    int         minmax(Board*, int, int);
    void        checkMate(short);
    void        staleMate();
    int         alphaBeta(Board *board, int ply, int depth, int alpha, int beta);
    game_result alphaBetaBase(int, int);
    void        movePiece(int,int,int,int);
    game_result checkGameStatus();
    game_result minMaxBase(int,int);
    game_result noCPUMoves();
    piecetype   humanPromotion();
    bool        validateMove(Board);

    bool using_alphabeta;
    Board currentBoard;
    int currentPly;
};

#endif	/* _GAME_H */

